<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<iframe></iframe>
<script>
test(function() {
    var frame = document.querySelector('iframe');
    frame.contentWindow.addEventListener('focus', function() {
        frame.remove();
    });
    frame.focus();
}, 'Removing an IFRAME from the document tree while focusing on the IFRAME should not crash.');
</script>
